import request from "@/utils/request";
const BASE_URL = "/salvage/licence";

export function queryList(query) {
  return request({
    url: BASE_URL,
    method: "get",
    params: query,
  });
}
//方案新建（无模板）
export function createLicence(wellId) {
  return request({
    url: BASE_URL,
    method: "post",
    data: { wellId }
  });
}

//方案数据查询
export function getDataOne(id) {
  return request({
    url: BASE_URL + "/" + id + "/data",
    method: "get",
  });
}

//方案数据更新
export function updateOne(licenceId, data) {
  return request({
    url: BASE_URL + "/" + licenceId + "/data",
    method: "put",
    data: data,
  });
}
//方案删除
export function deleteOne(id) {
  return request({
    url: BASE_URL + "/" + id,
    method: "delete",
  });
}

export default {
  queryList,
  deleteOne,
}